{% load tags %}
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <title>{% block title %}{% endblock %}</title>

    <link href="/static/css/bootstrap.min.css" rel="stylesheet">
    {% block css %}
    {% endblock %}
    <link href="/static/font-awesome/css/font-awesome.css" rel="stylesheet">

    <!-- Toastr style -->
    <link href="/static/css/plugins/toastr/toastr.min.css" rel="stylesheet">

    <!-- Gritter -->
    <link href="/static/js/plugins/gritter/jquery.gritter.css" rel="stylesheet">

    <link href="/static/css/animate.css" rel="stylesheet">
    <link href="/static/css/style.css" rel="stylesheet">
    <link href="/static/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">

    <!-- FooTable -->
    <link href="/static/css/plugins/footable/footable.core.css" rel="stylesheet">

    <link href="/static/css/animate.css" rel="stylesheet">
    <link href="/static/css/style.css" rel="stylesheet">

    <link href="/static/css/plugins/datapicker/datepicker3.css" rel="stylesheet">


    <link href="/static/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/static/css/animate.css" rel="stylesheet">
    <link href="/static/css/style.css" rel="stylesheet">

    <link rel="shortcut icon" href="/static/img/logo.ico" />

    <script src="/static/js/plugins/sweetalert/sweetalert.min.js"></script>




</head>

<body>
    <div id="wrapper">
        <nav class="navbar-default navbar-static-side" role="navigation">
            <div class="sidebar-collapse">
                <ul class="nav metismenu" id="side-menu">
                <li class="nav-header">
                    <div class="dropdown profile-element"> <span>
                        <img alt="image" class="img-circle" src="/static/media/{{ request.user.image }}" />
                        </span>
                        <a data-toggle="dropdown" class="dropdown-toggle" href="search_results.html#">
                        <span class="clear"> <span class="block m-t-xs"> <strong class="font-bold">您好，{{ request.user }}</strong>
                        </span> <span class="text-muted text-xs block">个人设置 <b class="caret"></b></span> </span> </a>
                        <ul class="dropdown-menu animated fadeInRight m-t-xs">
                            <li><a href="#">用户信息</a></li>
                            <li><a href="{% url 'logout' %}">退出</a></li>
                        </ul>
                    </div>
                    <div class="logo-element">
                        IN+
                    </div>
                </li>

                    <li {{ index }}>
                        <a href="{% url 'index' %}"><i class="fa fa-th-large"></i> <span class="nav-label">控制台</span></a>
                    </li>
                    <li {{ services }}>
                        <a href="#"><i class="fa fa-desktop"></i> <span class="nav-label">服务器管</span><span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level collapse">
                            <li {{ service }}><a href="{% url 'server' %}">服务器</a></li>
                            <li {{ room }}><a href="{% url 'room' %}">IDC机房</a></li>
                        </ul>
                    </li>
                    <li {{ ssh }}>
                         <a href="#"><i class="fa fa-terminal"></i> <span class="nav-label">终端</span><span class="fa arrow"></span></a>
                         <ul class="nav nav-second-level collapse">
                             <li {{ terminal }}>
                                 <a href="{% url 'terminal' %}">连接终端</a>
                             </li>
                             <li {{ terminaluser }}>
                                 <a href="{% url 'terminals' %}">连接管理</a>
                             </li>
                         </ul>
                    </li>
                     <li {{ zabbix }}>
                        <a href="{% url 'zabbix' %}"><i class="fa fa-video-camera"></i> <span class="nav-label">监控（Zabbix）</span></a>
                    </li>
                    <li {{ salt }}>
                        <a href="#"><i class="fa fa-rocket"></i> <span class="nav-label">批量执行（SaltStack）</span><span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level collapse">
                            <li {{ saltcommand }}><a href="{% url 'saltcmd' %}">管理</a></li>
                            <li {{ saltrun }}><a href="{% url 'room' %}">执行</a></li>
                        </ul>
                    </li>
                    <li>
                        <a href="/xadmin/"><i class="fa fa-cogs"></i> <span class="nav-label">后台管理</span></a>
                    </li>
                </ul>
            </div>
        </nav>


        <div id="page-wrapper" class="gray-bg dashbard-1">
            <div class="row border-bottom">
                <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                    <div class="navbar-header col-md-8">
                        <a class="minimalize-styl-2 btn btn-primary " href="{{ request.path }}"><i class="fa fa-bars"></i> </a>
                        <form role="search" class="navbar-form-custom" action="{% get_url request %}">
                            <div class="form-group">
                                <input type="text" placeholder="请输入要搜索的关键字" class="form-control" name="top-search" id="top-search" value="{{ last_search }}">
                            </div>
                        </form>

                    </div>
                    <ul class="nav navbar-top-links navbar-right">
                        <li>
                            <span class="m-r-sm text-muted welcome-message">欢迎使用 ITAdmin.</span>
                        </li>
                        <li>
                            <a href="{% url 'logout' %}">
                                <i class="fa fa-sign-out"></i> 注销
                            </a>
                        </li>
                    </ul>
                </nav>
            </div>

            {% block body %}{% endblock %}

        </div>
    </div>

    <!-- Mainly scripts -->
    <script src="/static/js/jquery-2.1.1.js"></script>
    <script src="/static/js/bootstrap.min.js"></script>

    <!-- Flot -->
    <script src="/static/js/plugins/flot/jquery.flot.js"></script>
    <script src="/static/js/plugins/flot/jquery.flot.tooltip.min.js"></script>
    <script src="/static/js/plugins/flot/jquery.flot.spline.js"></script>
    <script src="/static/js/plugins/flot/jquery.flot.resize.js"></script>
    <script src="/static/js/plugins/flot/jquery.flot.pie.js"></script>

    <!-- Peity -->
    <script src="/static/js/plugins/peity/jquery.peity.min.js"></script>
    <script src="/static/js/demo/peity-demo.js"></script>



    <!-- jQuery UI -->
    <script src="/static/js/plugins/jquery-ui/jquery-ui.min.js"></script>

    <!-- GITTER -->
    <script src="/static/js/plugins/gritter/jquery.gritter.min.js"></script>

    <!-- Sparkline -->
    <script src="/static/js/plugins/sparkline/jquery.sparkline.min.js"></script>

    <!-- Sparkline demo data  -->
    <script src="/static/js/demo/sparkline-demo.js"></script>

    <!-- ChartJS-->
    <script src="/static/js/plugins/chartJs/Chart.min.js"></script>

    <!-- Toastr -->
    <script src="/static/js/plugins/toastr/toastr.min.js"></script>


    <!-- Data picker -->
    <script src="/static/js/plugins/datapicker/bootstrap-datepicker.js"></script>


    <script src="/static/js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="/static/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>

    <!-- Custom and plugin javascript -->
    <script src="/static/js/inspinia.js"></script>
    <script src="/static/js/plugins/pace/pace.min.js"></script>

    <!-- iCheck -->
    <script src="/static/js/plugins/iCheck/icheck.min.js"></script>


    <script>
        $.ajaxSetup({
            data: {csrfmiddlewaretoken: '{{ csrf_token }}'},
        });

        $(document).ready(function() {

            $('#date_added').datepicker({
                todayBtn: "linked",
                keyboardNavigation: false,
                forceParse: false,
                calendarWeeks: true,
                autoclose: true
            });

            $('#date_modified').datepicker({
                todayBtn: "linked",
                keyboardNavigation: false,
                forceParse: false,
                calendarWeeks: true,
                autoclose: true
            });

        });

    </script>

{% block script %}{% endblock %}

</body>
</html>
